package marcus.jpa;

import java.text.ParseException;
import java.util.List;

import marcus.jpa.dao.ContactsDao;
import marcus.jpa.entities.Contact;
import marcus.jpa.entities.User;



/**
 * Hello world!
 *
 */
public class App 
{
	public static void main( String[] args ) throws ParseException
	{
		System.out.println( "Hello World!" );

		//List<User> users = ContactsUtil.getUsers();
		List<User> users = ContactsDao.getUsers();
		for (User user : users){
			System.out.println(user);
			List<Contact> contacts = ContactsDao.getContacts(user);
			for (Contact contact : contacts){
				System.out.println("\t" + contact);
				//new DateCalculator().test(contact);
				/*
				ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
			    BeanFactory factory = context;
			    Age age = (Age) factory
    			        .getBean("age");
			    age.setUp(new Date(), contact);
    				System.out.println(age);
*/
			}
		}


	}


}
